<template>
  <view class="loan-condition-box">
    <view class="title">热销产品</view>
    <view class="loan-condition-item">
      <view class="loan-condition-item" @click="handle('1')">
        <img src="../../../static/icon_shaixuan.png" alt="">
        <text style="margin-left: 10rpx">筛选</text>
      </view>
      
      <view class="loan-condition-item" style="margin-left: 40rpx" @click="handle('2')">
        <img src="../../../static/icon_sort.png" alt="">
        <text style="margin-left: 10rpx">排序</text>
      </view>
    </view>
    
  </view>
</template>

<script>
export default {
  data() {
    return {
      
    }
  },
  methods:{
    handle(type) {
      switch(type) {
        case '1':
          
          this.$emit('changeCondition', '1')
        break
        case '2':
        this.$emit('changeCondition', '2')
        break
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.loan-condition-box{
  display: flex;
  justify-content: space-between;
  padding: 20rpx 40rpx;
  .title{
    font-weight: bold;
  }
  .loan-condition-item{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24rpx;
  }
}
</style>